<%--
    Document   : index
    Created on : Mar 10, 2014, 10:54:45 PM
    Author     : Anton Strack
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="csd" tagdir="/WEB-INF/tags" %>

<%-- If the JSP file is called directly from a URL instead of from the controller, go to controller.        --%>
<%@include file="/common/redirect.jsp" %>

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Home Page</title>
        <%@include file="/common/header.jsp" %>
    </head>
    <body id="main">
        <%@include file="/common/topNavigation.jsp" %>
        <div class="container panel">
            <div class="panel-heading">
                <h1>Welcome</h1>
            </div>
            <div class="panel-body row">
                <div class="col-lg-2 csd_site_column">
                    <div class="panel-group">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h4 class="panel-title">
                                    <a data-toggle="collapse" href="#siteCollapseOne">
                                        Recent Comments
                                    </a>
                                </h4>
                            </div>
                            <div id="siteCollapseOne" class="panel-collapse collapse in">
                                <div class="panel-body">
                                    <ul class="list-group">
                                        <csd:listRecentComments recentComments="${recentcomments}" emptyMessage="No recent comments."></csd:listRecentComments>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-8 csd_content_column">
                    <csd:displayResultMessage></csd:displayResultMessage>
                        <div class='homepage_center'>
                        <c:choose>
                            <c:when test="${loggedIn == 1}">
                                <p>Below is a list of the most recent posts on the site. Posts outlined in dark orange are new or have been updated since you last read them and posts outlined in blue have been commented on since you last read them.</p>
                            </c:when>
                            <c:otherwise>
                                <p>This site is for the development of DA Uprising.
                                    Please note that this site contains development stage content and thus it might contain spoilers for the story and while the primary text content is obfuscated in Latin, the titles are not.</p>
                                <p>
                                <ol>
                                    <li>Act I is released and can be downloaded at the Dragon Age Nexus. <a href="http://dragonage.nexusmods.com/mods/3705/">DA Uprising Act I</a></li>
                                    <li>Act 2 is currently still in development.</li>
                                    <li>Act 3 development will begin after Act 2 is released.</li>
                                </ol>
                                </p>
                            </c:otherwise>
                        </c:choose>

                        <div class="panel homepage_item">
                            <div class="panel-heading">
                                <h3>Dialogs</h3>
                            </div>
                            <div class="panel-body row">
                                <ul class="list-group">
                                    <csd:listRecentPostsDash recentPosts="${recentdialogs}" emptyMessage="No recent dialogs."></csd:listRecentPostsDash>
                                    </ul>
                                </div>
                            </div>
                            <div class="panel homepage_item">
                                <div class="panel-heading">
                                    <h3>Plots</h3>
                                </div>
                                <div class="panel-body row">
                                    <ul class="list-group">
                                    <csd:listRecentPostsDash recentPosts="${recentplots}" emptyMessage="No recent plots."></csd:listRecentPostsDash>
                                    </ul>
                                </div>
                            </div>
                            <div class="clearboth"></div>
                            <div class="panel homepage_item">
                                <div class="panel-heading">
                                    <h3>Characters</h3>
                                </div>
                                <div class="panel-body row">
                                    <ul class="list-group">
                                    <csd:listRecentPostsDash recentPosts="${recentcharacters}" emptyMessage="No recent characters."></csd:listRecentPostsDash>
                                    </ul>
                                </div>
                            </div>
                            <div class="panel homepage_item">
                                <div class="panel-heading">
                                    <h3>Locations</h3>
                                </div>
                                <div class="panel-body row">
                                    <ul class="list-group">
                                    <csd:listRecentPostsDash recentPosts="${recentlocations}" emptyMessage="No recent locations."></csd:listRecentPostsDash>
                                    </ul>
                                </div>
                            </div>
                            <div class="clearboth"></div>


                        </div>
                    </div>
                <%@include file="/common/userColumn.jsp" %>
            </div>
            <div id="footer">
                <%@include file="/common/footer.jsp" %>
            </div>
        </div>

    </body>
</html>


